package cn.jiyun.controller;

import cn.jiyun.dao.game.GameDTO;
import cn.jiyun.feign.GameFeign;
import cn.jiyun.vo.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Author 王晨
 * Date 2023/8/23
 */
@RestController
@RequestMapping("/game")
public class GameController {
    @Autowired
    private GameFeign gameFeign;

    @RequestMapping("/gcount")//查询当前登录人的竞赛
    public R gcount(GameDTO gameDTO){
        return gameFeign.GameCount(gameDTO);
    }
    @RequestMapping("/findCount")
    public R findCount(GameDTO gameDTO){//查询所有的竞赛的信息
        return gameFeign.findCount(gameDTO);
    }
    @RequestMapping("/findColor")//查询有几人参加
    public R findColor(Integer gid){
        return gameFeign.findColor(gid);
    }

    @RequestMapping("/findGameLogin")
    public R findGameLogin(GameDTO gameDTO){
        return gameFeign.findGameLogin(gameDTO);
    }
}
